package com.learn.sc.springbootdemo.service.impl;

import com.learn.sc.springbootdemo.mapper.IDictParamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@EnableCaching
public class DictParamServiceImpl implements IDictParamMapper {
    @Autowired
    IDictParamMapper iDictParamMapper;
    @Override
    @Cacheable(value = "redis-default-cache1")
    public List<Map<String, String>> getParamKindMap(String dictKind) {
//        System.out.println("————————————————访问数据库——————————————");
        return iDictParamMapper.getParamKindMap(dictKind);
    }
}
